{% extends "index.html" %}
{% block mainmenu %}
<div class="button" onclick="javascript:document.location='/'">News</div>
<div class="button" onclick="javascript:document.location='/folders'">Folders</div>
<div class="button_disabled">Groups</div>
<div class="button" onclick="javascript:document.location='/search'">Search</div>
<div class="button" onclick="javascript:document.location='/profile'">Profile</div>
<div class="button" onclick="javascript:document.location='/logout'">Logout</div>
{% endblock %}

{% block rightpart %}
<div class="folderheader">Groups</div>
{% if groups %}
<div class="rightmenu" onclick="javascript:document.location='/groups/';">All</div>
{% for p in groups %}
<div id="opengroup{{p.id}}" class="rightmenu" onclick="javascript:document.location='/group/{{p.id}}';">{{p.title}}</div>
{% endfor %}
{% endif %}
<div id="creategroup" class="rightmenu" onclick="javascript:create_new_group();">Create new group</div>
{% endblock %}

{% block leftpart %}
{% for p in groups %}

<div><a href="/group/{{p.id}}">{{p.title}}</a>: {{p.folders.count}} folders, {{p.members.count}} members, {{p.grouptopic_set.count}} topics</div>

{% endfor %}
{% endblock %}